package com.ipfsemc.ipfsemc.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

@Data
@ApiModel(value = "UserSpaceVo", description = "用户矿机")
public class UserSpaceVo {
    @ApiModelProperty(notes = "ID", example = "2")
    private Long spaceId;

    @ApiModelProperty(notes = "产品ID")
    private String proId;
    @ApiModelProperty(notes = "用户ID")
    private String userId;

    @ApiModelProperty(notes = "转让用户ID")
    private String toUser;

    @ApiModelProperty(notes = "规格",example = "2")
    private Integer space;

    @ApiModelProperty(notes = "算力")
    private BigDecimal hashrate;

    @ApiModelProperty(notes = "累计收益的fil币")
    private BigDecimal fil;

    @ApiModelProperty(notes = "到期时间")
    @JsonFormat(pattern = "yyyy-MM-dd ", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date expirationTime;

    @ApiModelProperty(notes = "启动日期")
    @JsonFormat(pattern = "yyyy-MM-dd ", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date startTime;

    @ApiModelProperty(notes = "服务费到期日期")
    @JsonFormat(pattern = "yyyy-MM-dd ", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date serviceTime;

    @ApiModelProperty(notes = "矿机类型 1 为年  2为租  3为买断 ",example = "2")
    private Integer proType;

    @ApiModelProperty(notes = "产品名",example = "海王")
    private String categoryName;

    @ApiModelProperty(notes = "存储配置",example = "40")
    private Integer categoryStore;

    @ApiModelProperty(notes = "申请时间  （包括申请退租时间或者转让成功时间）")
    @JsonFormat(pattern = "yyyy-MM-dd ", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date applyTime;

    @ApiModelProperty(notes = "付款时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date payTime;

    @ApiModelProperty(notes = "退租成功时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date passTime;

    @ApiModelProperty(notes = "矿机状态，0使用中 1申请中 -2 已过期 -3 已过期七天 -4服务费过期  -1 以退租，已转让   分为海王租用 和海皇转让")
    private Integer spaceState;

    @ApiModelProperty(notes = "托管费",readOnly = true)
    private Double proTrustee;

    @ApiModelProperty(notes = "服务费",readOnly = true)
    private Double maintenance;
}
